<?php

namespace App\Repositories;

use App\Models\Service;
use BobCoder\Construct\Foundation\Repository\Repository;

class ServiceRepository extends Repository
{
    protected $model;

    public function __construct()
    {
        $this->model = new Service();
    }


    /**
     * 获取业务类型名称
     * @param int $serviceId
     * @return string
     * @Author 姿势就是力量
     */
    public function getNameById(int $serviceId)
    {
        return $this->model->where('id', $serviceId)->value('name') ?? '';
    }

}
